package com.hnhcyy.goods.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.hnhcyy.goods.pojo.Top;

//商品销量第一表
public interface TopMapper {
	
	@Insert("insert into top(spid,top1,jpgfile,leibieid,leibie2,findex,fstarttime,fendtime,sjid) "+
			" values (#{spid},#{top1},#{jpgfile},#{leibieid},#{leibie2},#{findex},#{fstarttime},#{fendtime},#{sjid})")
	public int insert(Top top);
	
	@Delete("delete from top where fid=#{fid}")
	public int delete(int fid);
	
	@Update("update top set spid=#{spid},top1=#{top1},jpgfile=#{jpgfile},leibieid=#{leibieid},leibie2=#{leibie2},findex=#{findex},fstarttime=#{fstarttime},fendtime=#{fendtime},sjid=#{sjid} "+
			" where fid=#{fid}")
	public int update(Top top);
	
	@Select("select fid,spid,top1,jpgfile,leibieid,leibie2,findex,fstarttime,fendtime,sjid from top where fid=#{fid}")
	public Top select(int fid);
	
}
